package com.xiaocg.spring.tx;

import com.xiaocg.config.SpringConfig;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

public class TestTx {

    @Test
    public void testTx() throws Exception{
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);
        UserService userService = context.getBean("userService", UserService.class);
        userService.TestTx();

    }
}
